package com.objectville.tour.rmi.client;

import java.rmi.Naming;

import com.objectville.tour.rmi.server.MyRemote;

public class MyRemoteClient {
	public static void main(String[] args){
		new MyRemoteClient().go();
	}
	
	public void go() {
		try {
			MyRemote service = (MyRemote) Naming.lookup("rmi://127.0.0.1/RemoteHello");
			String s = service.sayHello();
			System.out.println(s);
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
}